package com.ethink.order.api.constant;


import com.ethink.framework.common.constant.ResponseCodeEnum;

/**
 * 业务模块 api接口响应码
 * 响应码范围 120000 ~ 129999
 *
 * @author yunduo
 **/
public enum OrderRespCode implements ResponseCodeEnum {
    CONFIRM_NUMBER_LESS_THAN("120000","请先确认需求订单中所有关联商品数量,再提交"),
    THE_BID_WAS_NOT_AWARDED("120001","预供订单存在未中标,无法生成采购单"),
    ONLY_ONE("120002","需求订单或供应商不一致"),
    NUMBER_OF_MORE("120003","锁单数量超过需求确认数量"),
    PURCHASE_ORDER_DETAIL_STATUS_IS_NOT_MET("120004","已中标或未中标的订单暂不支持该操作"),
    SALE_ORDER_DETAIL_STATUS_IS_NOT_MET("120005","仅支持草稿状态操作"),
    EXCEL_DATA_SIZE("120006","条数超过限制"),
    MATE_SKU_EXCEL_IS_NOT_EXIST("120007","导入数据含有不存在的商品编码!!!"),
    ORDER_STATUS_IS_NOT_LOCK("120008","订单不是锁单状态,无法进行该操作!!"),
    PO_NO_AND_SALE_CHANNEL_IS_NOT_MATCHING("120009","po单号和订单来源不匹配"),
    NUMBER_OF_MORE_AVAILABLE("120010","锁单数量超过可供数量"),
    STATUS_FINISH("120011","订单已完成,无法操作"),
    PURCHASE_STATUS_IS_NOT("120012","订单已发货,无法更改仓库"),
    DIFF_MATE_SKU("120013","结算单中有以下商品编码在预售单中无法匹配:%s"),
    NUM_MORE_MATE_SKU("120014","以下商品结算数量超出预售单中待结算数量:%s"),
    DIFF_MATE_SKU_1("120015","导入数据中有以下商品编码无效(注意编码前后是否含有空格):%s"),
    EXPORT_SALE_ORDER_NO_ERROR("120016","导入数据错误:"),
    ;

    /**
     * 响应码
     */
    private String code;

    /**
     * 响应描述
     */
    private String message;

    /**
     * 构造函数
     *
     * @param code    响应码
     * @param message 响应描述
     */
    private OrderRespCode(String code, String message) {
        this.code = code;
        this.message = message;
    }

    @Override
    public String getCode() {
        return code;
    }

    @Override
    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }
}
